<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.enterprise.domain.Feedback"%>
<%@page import="com.enterprise.daoImpl.FeedbackDaoImpl"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="Inc/Head.jsp"%>
<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗？"))
     return true;
   else
     return false;
}
</script>



<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> <br> 
      <table width="560" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr> 
          <td height="28" class="back_southidc"> 
            <div align="center"><strong>发布管理员公告 <br>
              </strong></div></td>
        </tr>
        <tr class="tr_southidc"> 
          <form method="POST" action="<%=basePath%>feedbacks-add.action?className=-1">
           <s:token/>
            <input type=hidden readonly name="contact"   value="[管理员]<%=request.getSession().getAttribute("loginUsername")%>">
             <input type=hidden readonly name="btime"   value="<%=new SimpleDateFormat("yyyy-MM-dd").format(new Date())%>">
            <td><div align="center"> 
                <table width="100%" border="0" cellspacing="1" cellpadding="0">
                  <tr bgcolor="#A4B6D7"> 
                    <td width="16%" height="25"> <div align="center">标&nbsp;&nbsp;题</div></td>
                    <td width="45%"> <input name="theme" type="text" size="35" maxlength="100"></td>
                    <td width="17%"><div align="center">语言:</div></td>
                 
                    <td width="22%"><select name="Language" id="Language">
                        <option value="0">中文</option>
                        <option value="1">英文</option>
                      </select></td>
                  </tr>
                  <tr> 
                    <td height="22"> <div align="center">内&nbsp;&nbsp;容</div></td>
                    <td colspan="3"> <textarea rows="8" name="content" cols="45"></textarea> 
                    </td>
                  </tr>
                  <tr bgcolor="#A4B6D7"> 
                    <td height="25" colspan="4"> <div align="center">是否支持html 
                        <input type="checkbox" name="html" value="on">
                       
                        <input type="submit" value="提交公告" name="B1">
                        <input type="reset" value="全部重写" name="B2">
                      </div></td>
                  </tr>
                </table>
				<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#000000">
                  <tr bgcolor="#ECF5FF"> 
                    <td width="63%" height="25" bgcolor="#ECF5FF"> <div align="center">公告标题</div>
                      <div align="center"></div></td>
                    <td width="18%"> <div align="center">加入时间</div></td>
                    <td width="9%"> <div align="center">操作</div></td>
                    <td width="10%"> <div align="center">操作</div></td>
                  </tr>
                  <%
                  	FeedbackDaoImpl feedbackDaoImpl=new FeedbackDaoImpl();
                  	List<Feedback> feedbacks=feedbackDaoImpl.getFeedbackByClassName("-1");
                  	if(feedbacks!=null&&feedbacks.size()>0)
                  	for(Feedback feedback:feedbacks){
                   %>
                  <tr bgcolor="#ECF5FF"> 
                    <td height="22" bgcolor="#ECF5FF"> <div align="center"> <%=feedback.getTheme()%></div>
                      <div align="center"></div></td>
                    <td> <div align="center"><%=new SimpleDateFormat("yyyy-MM-dd").format(feedback.getBtime())%></div></td>
                    <td> <div align="center"><a href="<%=basePath %>admin/Admin_FeedbackEdit.jsp?id=<%=feedback.getId()%>">修改</a></div></td>
                    <td> <div align="center"><a href="<%=basePath %>feedback-delete.action?id=<%=feedback.getId()%>" onClick="return ConfirmDel();">删除</a></div></td>
                  </tr>
  				<%} %>
                </table>
              </div></td>
          </form>
        </tr>
      </table>
      <br> <br> </td>
  </tr>
</table>
<%@ include file="Inc/Foot.jsp"%>